package com.aaa.doctor.feign;

import com.aaa.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

@FeignClient(value = "his-open-system")
public interface UserFeign {

    /**
     * 通过手机号查询用户信息
     */
    @GetMapping("/system/user/getByUsername/{username}")
    public User getByUsername(@PathVariable String username);

    /**
     * 查询用户所有的信息
     * @return
     */
    @GetMapping("/system/user/getAllUserList")
    public List<User> getAllUserList();

    /**
     * 查询用户是否需要排班
     */
    @PostMapping("/system/user/queryUserNeedScheduling")
    public List<User> queryUserNeedScheduling(@RequestBody Map<String,Object> map);

    /**
     * 根据userID查询接诊医生
     * @param userId
     * @return
     */
    @PostMapping("getUsernameById/{userId}")
    public String getUsernameById(@PathVariable Long userId);
}
